current_weekday

将当前周几作为一个实数返回。

语法:

current_weekday;


返回: Real(实数)


描述

只读 变量将周几作为一个实数返回,星期日是0,星期六是6,以此类推。


例如:

var day;
switch(current_weekday)
   {
   case 0: day = "Sunday"; break;
   case 1: day = "Monday"; break;
   case 2: day = "Tuesday"; break;
   case 3: day = "Wednesday"; break;
   case 4: day = "Thursday"; break;
   case 5: day = "Friday"; break;
   case 6: day = "Saturday"; break;
   }
draw_text(32, 32, "Today is " + day +".");

上述代码使用 current_weekday 值来控制玩家将会看到的内容。


上一页: Date And Time
下一页: current_month
© Copyright YoYo Games Ltd. 2018 All Rights Reserved